package com.jcl.recruit.elasticsearch.resume.logic;

import com.jcl.recruit.elasticsearch.resume.dao.SearchResumeBasicInfoDao;
import com.jcl.recruit.elasticsearch.resume.model.SearchResumeBasicInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @ClassName SearchResumeBasicInfoLogic
 * @Author yyliu
 * @Date 2018/11/13 10:32
 * @Version 1.0
 **/
@Component
public class SearchResumeBasicInfoLogic {

    @Autowired
    private SearchResumeBasicInfoDao searchResumeBasicInfoDao;

    public List<Map<String, Object>> findAllMap(String corpCode, String channelAccount) {

        return searchResumeBasicInfoDao.findAllMap(corpCode, channelAccount);
    }

    public List<SearchResumeBasicInfo> findAll(String corpCode, String channelAccount) {
        return searchResumeBasicInfoDao.findAll(corpCode, channelAccount);
    }

    public List<Map<String, String>> selectCountBySources(Boolean today) {
        return searchResumeBasicInfoDao.selectCountBySources(today);
    }

    public List<SearchResumeBasicInfo> findList(List<Integer> ids) {
        return searchResumeBasicInfoDao.findList(ids);
    }

    public Map<String, Object> findOneMap(Integer id) {
        return searchResumeBasicInfoDao.findOneMap(id);
    }

    public SearchResumeBasicInfo findOne(Integer id) {
        return searchResumeBasicInfoDao.findOne(id);
    }

    public int add(SearchResumeBasicInfo entity) {
        return searchResumeBasicInfoDao.add(entity);
    }

    public int update(SearchResumeBasicInfo entity) {
        return searchResumeBasicInfoDao.update(entity);
    }

    public int delete(Integer id) {
        return searchResumeBasicInfoDao.delete(id);
    }
}
